/**
 * Created by Administrator on 2019/9/30.
 */

/*限时特卖*/
$(function(){
    $.getJSON("/easybuy/home/orderByPrice",
        function(data){
            $(".sell_right").html("");
            for(var i=0;i<4;i++){
                $(".sell_right").append("<div class='sell_"+(i+1)+"'> " +
                    "<div class='s_img'><a href='Product.html?id="+data[i].id+"'><img src='images/"+data[i].fileName+"' width='185' height='155' /></a></div>"+
                    "<div class='s_price'>￥<span>"+data[i].price+"</span></div>" +
                    "<div class='s_name'> " +
                    "<h2><a href='Product.html?id="+data[i].id+"'>"+data[i].name+"</a></h2>" +
                    "倒计时：<span>1200</span> 时 <span>30</span> 分 <span>28</span> 秒 " +
                    "</div> " +
                    "</div>");
            }
            for(var i=4;i<6;i++){
                $(".sell_"+(i-3)*2).after("<div class='sell_b"+(i-3)+"'> " +
                    "<div class='sb_img'><a href='Product.html?id="+data[i].id+"'><img src='images/"+data[i].fileName+"' width='242' height='356' /></a></div>"+
                    "<div class='s_price'>￥<span>"+data[i].price+"</span></div>" +
                    "<div class='s_name'> " +
                    "<h2><a href='Product.html?id="+data[i].id+"'>"+data[i].name+"</a></h2>" +
                    "倒计时：<span>1200</span> 时 <span>30</span> 分 <span>28</span> 秒 " +
                    "</div> " +
                    "</div>");
            }
        }
    );
});
